Fix error when selecting item as the line type in German language - #9937
Fix error when selecting item as the line type in German language #9937Ceshark (6CRIPT) wants to merge 10 commits into
Conversation
…dure for improved type handling
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR changes Option Lookup Buffer to remember the current line type by ID instead of by caption. That is the right direction for translated line type captions, and the W1 and CH changes stay aligned. The fix does not cover the full Blanket Sales Order path from the bug. After the lookup validates the new type, BlanketSalesOrderSubform.UpdateTypeText() still calls Rec.FormatType(), and Sales Line.FormatType() returns Text[20]. The German caption for Charge (Item) is longer than that, so selecting the value or opening an existing line can still hit the same string length error. SuggestionsS1 - Fix the remaining Blanket Sales Order text path S2 - Add a German regression test Risk assessment and necessityRisk: The changed table is used by sales and purchase subtype fields, so a wrong fallback can affect many document pages. The immediate risk is still focused on line type display and validation, not posting amounts or public event contracts. There is no BaseApp publisher dependency in this PR. Necessity: The bug is valid and important: German users cannot select Charge (Item) on Blanket Sales Orders, and the work item says there is no workaround. The change is necessary, but the current scope misses one execution path that is part of the reported scenario.
|
|
…n-selecting-the-line-type-item-in-German
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Agentic PR Review - Round 2Recommendation: AcceptWhat this PR doesThis update fixes the remaining Blanket Sales Order display path for long translated line type captions. UpdateTypeText() now uses Option Lookup Buffer.FormatOption() in W1, CH, NA, and NO, so the visible type text no longer goes through the Text[20] result from Sales Line.FormatType(). The change addresses the reported German Charge (Item) scenario and aligns Blanket Sales Orders with the other sales document subforms that already use the option lookup buffer for this field. The added W1 and CH tests select the German caption on a Blanket Sales Order line and verify that the full caption stays visible. Status of previous suggestions
New observations (commits since round 1)None - changes only addressed the previous suggestions. Risk assessment and necessityRisk: The changed path is the Basic/Suite display and validation helper for the sales line type on Blanket Sales Orders in W1, CH, NA, and NO. It does not change posting, amounts, ledger data, or public signatures. It does switch this page from the Sales Line.FormatType() formatting event path to the option lookup buffer formatting path for non-blank types, but that matches the other sales document subforms. Necessity: The bug is valid and important because the German Charge (Item) caption is longer than 20 characters and blocked Blanket Sales Order line entry. The scope is narrow and now covers both the remaining display path and a direct regression test for the reported workflow.
|
…n-selecting-the-line-type-item-in-German
…n-selecting-the-line-type-item-in-German # Conflicts: # src/Layers/CH/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al # src/Layers/NA/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al # src/Layers/NO/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al # src/Layers/W1/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al # src/Layers/W1/Tests/Misc/MockSalesLineTypeCustom.EnumExt.al
Agentic PR Review - Round 3Recommendation: AcceptWhat this PR doesSince round 2, the regression test was made deterministic. It now uses a custom sales line type with a long caption and binds the option lookup subscriber, instead of changing the session language to German. The net PR diff contains W1 and CH tests that select a long caption on a Blanket Sales Order line and verify that the full caption remains visible. This still exercises the long-caption path that caused the reported German Charge (Item) failure, and it does not change production behavior. Status of previous suggestions
New observations (commits since round 2)None - the new authored change only makes the regression test deterministic. Risk assessment and necessityRisk: The current net diff only adds tests in W1 and CH. It does not change posting, amounts, ledger data, public signatures, or runtime page behavior. CI was still running for many unit-test buckets when reviewed, so final pipeline completion should still be checked. Necessity: The bug is valid because a line type caption longer than 20 characters blocked Blanket Sales Order line entry in German. A deterministic regression test is useful because it protects the same long-caption behavior without depending on global language state.
|
Fixes AB#644921
Needs a backport to 28.x to fix original WI.